#pragma once

#include "Defs.h"

namespace PHYOgre{
	
	class Shape
	{
	public:
		
		virtual ShapeType GetType() const= 0;
		virtual void Translate(const Vector3& iTranslation) = 0;
		virtual void Rotate(const Quaternion& iTranslation) = 0;
		virtual void Transform(const Matrix4& iMat) = 0;
	};

	class Box : public Shape
	{
		
		
	public:
		

		//Box();
		Box(const Vector3& iPosition,const Vector3& iHalfSize);
		Box(const Vector3& iPosition,const Vector3* iCorners);
		
		ShapeType GetType() const;
		void Translate(const Vector3& iTranslation);
		void Rotate(const Quaternion& iTranslation);
		
		void Transform(const Matrix4& iMat);
	private:
		Vector3 mVertices[8];
		//Vector3 mVerticesTransformed[8];

		Vector3 mPosition;
		Vector3 mHalfSize;
		friend  class CollisionDetector;
		
	};
	class Sphere : public Shape
	{
		
	public:
		friend  class CollisionDetector;
		//Sphere();
		Sphere(const Vector3& iPosition, const Real& iRadius);

		ShapeType GetType() const;
		void Transform(const Matrix4& iMat);
		void Translate(const Vector3& iTranslation);
		void Rotate(const Quaternion& iTranslation);
		
	private:
		Vector3 mPosition;
		Real mRadius;
		
	};
	class Plane : public Shape
	{
		
	public:
		
		friend  class CollisionDetector;
		Plane(const Vector3& iNormal,const Vector2& iSize, const Real& iOffset );

		ShapeType GetType() const;
		void Translate(const Vector3& iTranslation);
		void Rotate(const Quaternion& iTranslation);
		void Transform(const Matrix4& iMat);
	private:
		Vector3 mNormal;
		Vector2 mSize;
		Real mOffset;
		
	};
}